Skip to content

apollo_node_config,apollo_deployments: assert cross-component equality for formerly-pointer-resolved fields#14650

Draft
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/delete-base-app-configsfrom
nimrod/jsonnet/validate-cross-component-equality
Draft

apollo_node_config,apollo_deployments: assert cross-component equality for formerly-pointer-resolved fields#14650
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/delete-base-app-configsfrom
nimrod/jsonnet/validate-cross-component-equality

Conversation

@nimrod-starkware

Copy link
Copy Markdown
Contributor

CONFIG_POINTERS copies one source value into N component fields at load. Before that
resolution is deleted, add a present-only validator::Validate check (in
cross_member_validations) asserting those fields are equal across PRESENT components, so
hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality
groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the
*_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url;
native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode;
versioned_constants_overrides; revert_config), plus validation_only: a single-target
pointer whose target (the batcher's copy, which drives batcher behavior) is checked
against the always-present top-level source field. Skips starknet_url (String vs Url) and
validator_id (lone target with no independent source). New all_present_equal helper
compares present Option<&T>.

Enforce the invariant in CI: build_*_deserializes_into_node_config now calls
validate_node_config() on the build() output for every layout (not just deserializes), so
a jsonnet change that breaks a pointer group fails CI instead of only at prod boot.
Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the
test rewrites them to localhost before validating, reaching the cross-component checks.

Verified the build() native config passes the check for all layouts (no regression);
negative tests prove the guard fires (incl. validation_only). Raw
SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution
reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config
35/35, apollo_deployments 8/8 green.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

nimrod-starkware commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

…y for formerly-pointer-resolved fields

CONFIG_POINTERS copies one source value into N component fields at load. Before that
resolution is deleted, add a present-only validator::Validate check (in
cross_member_validations) asserting those fields are equal across PRESENT components, so
hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality
groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the
*_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url;
native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode;
versioned_constants_overrides; revert_config), plus validation_only: a single-target
pointer whose target (the batcher's copy, which drives batcher behavior) is checked
against the always-present top-level source field. Skips starknet_url (String vs Url) and
validator_id (lone target with no independent source). New all_present_equal helper
compares present Option<&T>.

Enforce the invariant in CI: build_*_deserializes_into_node_config now calls
validate_node_config() on the build() output for every layout (not just deserializes), so
a jsonnet change that breaks a pointer group fails CI instead of only at prod boot.
Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the
test rewrites them to localhost before validating, reaching the cross-component checks.

Verified the build() native config passes the check for all layouts (no regression);
negative tests prove the guard fires (incl. validation_only). Raw
SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution
reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config
35/35, apollo_deployments 8/8 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 9ecf4fe to e84d1fc Compare June 28, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants